Previous Book Contents Book Index Next

Inside Macintosh: Mac OS 8 Toolbox Reference /
Chapter 2 - Control Manager Reference / Control Manager Functions
Accessing and Changing Control Settings and Data /


GetControlDataSize

NEW WITH THE APPEARANCE MANAGER

Returns the size (in bytes) of a control's tagged data.

pascal OSErr GetControlDataSize (
                     ControlHandle inControl,
                     ControlPartCode inPart,
                     ResType inTagName,
                     Size *outMaxSize);
inControl
On input, a handle to the specified control.
inPart
The part code of the control part whose control-specific data you wish to set; see "Control Part Code Constants". Passing kControlEntireControl indicates that either the control has no parts or the data is not tied to any specific part of the control.
inTagName
A constant representing the control-specific data you wish to get; see "Control Data Tag Constants".
outMaxSize
On output, a pointer to the size of the control's tagged data. This value should be passed to SetControlData and GetControlData to allocate a sufficiently large buffer for variable-length data.
function result
A result code; see "Result Codes". The result code errDataNotSupported indicates that the inTagName parameter is not valid.
DISCUSSION
Pass the value returned in the outMaxSize parameter of GetControlDataSize in the inBufferSize parameter of SetControlData and GetControlData to allocate an adequate buffer for variable-length data.

SEE ALSO
"Appearance Manager Gestalt Selector Constants".


Previous Book Contents Book Index Next

© Apple Computer, Inc.
8 JAN 1998